package com.iot.iotplus.exception;



import com.iot.iotplus.base.ResultCode;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 类描述: 异常封装
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class NetworkDiskException extends RuntimeException {

    private ResultCode errorCode;

    public NetworkDiskException(ResultCode errorCode) {
        super(errorCode.getMessage());
        this.errorCode = errorCode;
    }

    public NetworkDiskException(String message) {
        super(message);
    }

    public NetworkDiskException(Throwable cause) {
        super(cause);
    }

    public NetworkDiskException(String message, Throwable cause) {
        super(message, cause);
    }

    public ResultCode getErrorCode() {
        return errorCode;
    }

}
